package com.kingwang.training.designpattern.visitor.bo;

import java.util.ArrayList;
import java.util.List;

/**
 * 业务报表生成
 *
 * @author King
 */
public class BusinessReport {
    private List<Staff> staffs = new ArrayList<>();

    public void addStaff(Staff staff) {
        this.staffs.add(staff);
    }

    public void showReport(Visitor visitor) {
        for (Staff staff : this.staffs) {
            staff.accept(visitor);
        }
    }
}
